FROM registry.cn-hangzhou.aliyuncs.com/bkhech-custom/jdk-debian-slim:17.0.13-1.0.0

MAINTAINER bkhech

RUN mkdir -p /mydata/logs

WORKDIR /mydata

ENV SERVER_PORT=55 LANG=C.UTF-8 LC_ALL=C.UTF-8 JAVA_OPTS="-Xms64m -Xmx128m -XX:+UseZGC" PROFILE=dev
EXPOSE ${SERVER_PORT}

ADD ./target/file-service-*.jar ./app.jar

ENTRYPOINT java -Djava.security.egd=file:/dev/./urandom -Dspring.profiles.active=${PROFILE} -Dserver.port=${SERVER_PORT} \
           ${JAVA_OPTS} \
           -jar app.jar